#ifndef CENTRALROW
#define CENTRALROW

#include "Data.h"
#include "Result.h"
#include "Typedefs.h"
#include <vector>
using namespace std;

class CentralRowSolver{

public:
CentralRowSolver();
void solve_MCS(const Data * data, Result & result, const s_rect & rect, int central_row);

private:
void find_max_and_index(const vector <int > & accumulator, int & max,
                                             int & dist_from_center);
void update_result(Result & result, t_int x0, t_int y0, t_int x1, t_int y1, t_int sum);
void initialize_accumulators( Result & best_result, Result & upper_result, Result & lower_result,
                                               vector<int> & accumulator_up, vector<int> & accumulator_down,
                                               int upper_y, int local_x1, int top_y, int down_y);
const Data * data_ptr;
const Mat * mat_ptr;

};

#endif
